const { get_others } = require('../../../Class/GetOthers.js');
const getOthers = new get_others();
Page({

  GoRead(e){
    const id = e.currentTarget.dataset.id
    wx.navigateTo({
      url: '/pages/e-courses/read/read?id='+id 
    })
  },
  
  async onLoad(options){
    wx.showLoading({
      title: '数据通信中',
      mask:true
    })
    const result = await getOthers.Get_TXT()
    const num = JSON.parse(options.id)
    const { search } = options
    const pdf = result.filter(item => num.includes(item.id));
    this.setData({
        search,pdf
    })
    wx.hideLoading()
  }
})